<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickimageprovider.cpp -->
  <title>QQuickAsyncImageProvider 类 | Qt Quick 5.12.3</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.12</a></td><td ><a href="qtquick-index.html">Qt Quick 模块</a></td><td ><a href="qtquick-module.html">C++ 类</a></td><td >QQuickAsyncImageProvider</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtquick-index.html">Qt 5.12.3 参考指南</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">目录</a></h3>
<ul>
<li class="level1"><a href="#public-functions">公用函数</a></li>
<li class="level1"><a href="#details">详细信息</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QQuickAsyncImageProvider 类</h1>
<!-- $$$QQuickAsyncImageProvider-brief -->
<p>The <a href="qquickasyncimageprovider.html">QQuickAsyncImageProvider</a> class provides an interface for for asynchronous control of QML image requests. <a href="#details">更多...</a></p>
<!-- @@@QQuickAsyncImageProvider -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign">头文件：</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QQuickAsyncImageProvider&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += quick</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.6</td></tr><tr><td class="memItemLeft rightAlign topAlign">继承自：</td><td class="memItemRight bottomAlign"> <a href="qquickimageprovider.html">QQuickImageProvider</a></td></tr></table></div><ul>
<li><a href="qquickasyncimageprovider-members.html">所有成员的列表，包括继承成员</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">公用函数</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qquickasyncimageprovider.html#QQuickAsyncImageProvider">QQuickAsyncImageProvider</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qquickasyncimageprovider.html#dtor.QQuickAsyncImageProvider">~QQuickAsyncImageProvider</a></b>() override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QQuickImageResponse *</td><td class="memItemRight bottomAlign"><b><a href="qquickasyncimageprovider.html#requestImageResponse">requestImageResponse</a></b>(const QString &amp;<i>id</i>, const QSize &amp;<i>requestedSize</i>) = 0</td></tr>
</table></div>
<ul>
<li class="fn">5 个公用函数继承自<a href="qquickimageprovider.html#public-functions">QQuickImageProvider</a></li>
<li class="fn">2 个公用函数继承自<a href="../qtqml/qqmlimageproviderbase.html#public-functions">QQmlImageProviderBase</a></li>
</ul>
<a name="details"></a>
<!-- $$$QQuickAsyncImageProvider-description -->
<div class="descr">
<h2 id="details">详细信息</h2>
<p>The <a href="qquickasyncimageprovider.html">QQuickAsyncImageProvider</a> class provides an interface for for asynchronous control of QML image requests.</p>
<p>See the <a href="qtquick-imageresponseprovider-example.html">Image Response Provider Example</a> for a complete implementation.</p>
</div>
<p><b>请参考 </b><a href="qquickimageprovider.html">QQuickImageProvider</a>。</p>
<!-- @@@QQuickAsyncImageProvider -->
<div class="func">
<h2>成员函数文档</h2>
<!-- $$$QQuickAsyncImageProvider[overload1]$$$QQuickAsyncImageProvider -->
<h3 class="fn" id="QQuickAsyncImageProvider"><a name="QQuickAsyncImageProvider"></a>QQuickAsyncImageProvider::<span class="name">QQuickAsyncImageProvider</span>()</h3>
<p>Default constructs an instance of QQuickAsyncImageProvider.</p><!-- @@@QQuickAsyncImageProvider -->
<!-- $$$~QQuickAsyncImageProvider[overload1]$$$~QQuickAsyncImageProvider -->
<h3 class="fn" id="dtor.QQuickAsyncImageProvider"><a name="dtor.QQuickAsyncImageProvider"></a><code>[override virtual] </code>QQuickAsyncImageProvider::<span class="name">~QQuickAsyncImageProvider</span>()</h3>
<p>Destroys the instance of QQuickAsyncImageProvider. The destructor is virtual.</p><!-- @@@~QQuickAsyncImageProvider -->
<!-- $$$requestImageResponse[overload1]$$$requestImageResponseconstQString&constQSize& -->
<h3 class="fn" id="requestImageResponse"><a name="requestImageResponse"></a><code>[pure virtual] </code><span class="type"><a href="qquickimageresponse.html">QQuickImageResponse</a></span> *QQuickAsyncImageProvider::<span class="name">requestImageResponse</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>id</i>, const <span class="type"><a href="../qtcore/qsize.html">QSize</a></span> &amp;<i>requestedSize</i>)</h3>
<p>Implement this method to return the job that will provide the texture with <i>id</i>.</p>
<p>The <i>id</i> is the requested image source, with the &quot;image:&quot; scheme and provider identifier removed. For example, if the image <a href="qml-qtquick-image.html#source-prop">source</a> was &quot;image://myprovider/icons/home&quot;, the given <i>id</i> would be &quot;icons/home&quot;.</p>
<p>The <i>requestedSize</i> corresponds to the <a href="qml-qtquick-image.html#sourceSize-prop">Image::sourceSize</a> requested by an Image item. If <i>requestedSize</i> is a valid size, the image returned should be of that size.</p>
<p><b>Note: </b>this method may be called by multiple threads, so ensure the implementation of this method is reentrant.</p><!-- @@@requestImageResponse -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
